package com.gitee.wsl.coroutines.job.trigger

interface ISimpleTrigger : ITrigger {
    /**
     *
     *
     * Get the the number of times the `SimpleTrigger` should repeat,
     * after which it will be automatically deleted.
     *
     *
     * @see .REPEAT_INDEFINITELY
     */
    val repeatCount: Int

    /**
     *
     *
     * Get the the time interval (in milliseconds) at which the
     * `SimpleTrigger` should repeat.
     *
     */
    val repeatInterval: Long

    /**
     *
     *
     * Get the number of times the `SimpleTrigger` has already fired.
     *
     */
    val timesTriggered: Int

    override val triggerBuilder: TriggerBuilder<out ISimpleTrigger>?

    companion object {
        /**
         * Used to indicate the 'repeat count' of the trigger is indefinite. Or in
         * other words, the trigger should repeat continually until the trigger's
         * ending timestamp.
         */
        const val REPEAT_INDEFINITELY: Int = -1
    }
}